@extends('layouts.default')
@section('title', '注册')

@section('content')
  <div class="layui-col-md-offset3 layui-col-md6" style="margin-top: 50px;">
    <div class="layui-card">
      <div class="layui-card-header">
        <h4>用户注册</h4>
      </div>
      <div class="layui-card-body">
        <form method="POST" action="{{route('users.store')}}" class="layui-form">
          {{ csrf_field() }}
          <div class="layui-form-item">
            <label class="layui-form-label">名称：</label>
            <div class="layui-input-block">
              <input type="text" name="name" lay-verify="required" autocomplete="off" placeholder="请输入用户名" class="layui-input" value="{{ old('name') }}">
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">邮箱：</label>
            <div class="layui-input-block">
              <input type="text" name="email" lay-verify="email" autocomplete="off" placeholder="请输入邮箱" class="layui-input" value="{{ old('email') }}">
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">密码：</label>
            <div class="layui-input-block">
              <input type="password" name="password" lay-verify="required" autocomplete="off" placeholder="请输入密码" class="layui-input" value="{{ old('password') }}">
            </div>
          </div>
          <div class="layui-form-item">
            <label class="layui-form-label">确认密码：</label>
            <div class="layui-input-block">
              <input type="password" name="password_confirmation" lay-verify="required" autocomplete="off" placeholder="请输入密码" class="layui-input" value="{{ old('password_confirmation') }}">
            </div>
          </div>
          <button class="layui-btn ok-button" lay-submit lay-filter="formSingUp">注册</button>
        </form>
      </div>
    </div>
  </div>
@endsection

@section('js')
<script>
layui.use('form', function(){
  var form = layui.form;
});
</script>
@endsection
